<script setup lang="ts">
import { onMounted } from "vue";
import APlayer from "APlayer"; // 引入音乐插件
import "APlayer/dist/APlayer.min.css";
import { useStore } from "../stores/index";
const store = useStore();

let aPlayer: any;
onMounted(() => {
  aPlayer = new APlayer({
    container: document.getElementById("aplayer") as HTMLElement,
    lrcType: 3,
    listFolded: false,
    listMaxHeight: "100px",
    audio: store.audios,
  });
  Object.assign(window, {
    aPlayer,
  });
});
</script>

<template>
  <div id="aplayer"></div>
</template>

<style scoped>
#aplayer {
  display: flex;
  flex-direction: column-reverse;
}
</style>
